package com.example.obtaingaode.bean;

import com.blankj.utilcode.util.SPUtils;

import com.example.obtaingaode.util.Constants;

public class UserInfomation {

    public static void saveUser(Userbean bean) {
        saveStr(Constants.USER_ID, bean.getUserId());
        saveStr(Constants.USER_NAME, bean.getUserName());
        saveStr(Constants.USER_NO, bean.getUserNo());
    }

    public static String getUserId() {
        return getStr(Constants.USER_ID);
    }

    public static String getUserNo() {
        return getStr(Constants.USER_NO);
    }

    public static String getUserName() {
        return getStr(Constants.USER_NAME);
    }

    public static void saveStr(String key, String value) {
        SPUtils.getInstance().put(key, value);
    }

    public static String getStr(String key) {
        return SPUtils.getInstance().getString(key);
    }

}
